# import socket
#
# sk = socket.socket()
# sk.connect(('127.0.0.1', 8080))
# while 1:
#     info = input('>>>')
#     sk.send(bytes(info, encoding='utf-8'))
#     ret = sk.recv(1024).decode('utf-8')
#     print(ret)
#     if ret == 'bye':
#         sk.send('bye')
#         break
# sk.close()
import socket

sk = socket.socket()
sk.connect(('127.0.0.1', 8080))
username = input('请输入用户名')
password = input('请输入密码')
sk.send(bytes(username, encoding='utf-8'))
sk.send(bytes(password, encoding='utf-8'))
a=sk.recv(1024).decode('utf-8')
print(a)
sk.close()
